<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;

            background-color: red;
            border-radius: 20%;
            line-height: 100px;
            text-align: center;
        }

        /* .box:hover {
            background-color: green;
        } */

        .box::after {
            content: 'hello world';
            background-color: green;
        }
    </style>
</head>

<body>
    <div class="box">
        小马哥
    </div>

    <script>
        // 获取元素
        let box = document.querySelector('.box');
        // 获取伪类
        let all = getComputedStyle(box, 'after');
        console.log(all);

        // 如果我们要拿到伪类样式：元素本身的样式就拿不到
        // 互斥获取：要么是元素，要么是伪类

        // 实际开发中：很少操作伪类

    </script>
</body>



</html>